<?php
/**
 * Created by PhpStorm.
 * User: fuguang
 * Date: 2018/3/20
 * Time: 下午1:58
 */
use yii\helpers\Url;
?>
<div class="banner">
    <img src="http://image.yanbing.b<?= $userinfo->userInfo->avatar;?>" class="user-logo"/>
</div>
<div class="user">
    <h1><?= $userinfo->username;?></h1>
    <p></p>
</div>
<div class="wraper" id="home">
    <?php //Url::toRoute(['site/homeMore','id'=>'1']);?>
    <!-- foreach -->
    <?= $this->render('/site/homeitem', ['news' => $news,'userinfo' => $userinfo,'lastid' => $lastid]);?>
    <!-- foreach -->
</div>
<div id="lastid" style="display: none;"><?= $lastid;?></div>
<div id="authorid" style="display: none;"><?= $authorid;?></div>
<script src="/js/lvdong/detail.js"></script>
<script type="text/javascript">
    /*
    $(function () {
        $(".userhomepage").each(function () {
            var newsid = $(this).data("newsid");
            var key = "userhomepage-"+newsid;

            if(localStorage[key]){
                $(this).addClass('have');
            };
        });

        $(".userhomepage").click(function(){
            var _this = $(this);
            if(!_this.hasClass('have')){
                //发送请求
                var newsid = $(this).data("newsid");
                var key = "userhomepage-"+newsid;
                $.get("/nomup-"+newsid+".html", function(result){
                    if( result.ret ){
                        console.log('成功');

                        _this.addClass('have');
                        localStorage[key]="1";
                        var num = _this.text();
                        _this.text(num*1+1);
                    }
                });

            }
        });
    });
    */
</script>